#include "mainwindow.h"
#include "./ui_mainwindow.h"
#include <QButtonGroup>
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    QButtonGroup *btnGp=new QButtonGroup(this);
    btnGp->addButton(ui->toolButton_xingxi,0);
    btnGp->addButton(ui->toolButton_kecheng,1);
    btnGp->addButton(ui->toolButton_caiwu,2);
    btnGp->addButton(ui->toolButton_rongyu,3);
    btnGp->addButton(ui->toolButton_shezhi,4);

    connect(btnGp,&QButtonGroup::idClicked,ui->stackedWidget,&QStackedWidget::setCurrentIndex);
    ui->toolButton_xingxi->setChecked(true);

}

MainWindow::~MainWindow()
{
    delete ui;
}
